FROM java:8

LABEL author="cheng"

VOLUME /tmp

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

ENV LANG=zh_CN.UTF-8
ENV LC_ALL zh_CN.UTF-8

RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 && \
    echo 'LANG="zh_CN.UTF-8"' > /etc/locale.conf && \
    # 清理 yum 缓存，减小镜像大小
    yum clean all && \
    rm -rf /var/cache/yum

ADD ./crmeb-admin.jar /crmeb-admin.jar
RUN bash -c 'touch /crmeb-admin.jar'

ENTRYPOINT ["java", "-jar","-Xmx1024m", "/crmeb-admin.jar", "-Dfile.encoding=UTF-8", "-Dsun.jnu.encoding=UTF-8","--spring.profiles.active=prod"]
# 暴露端口
EXPOSE 20901
